<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .outer {
      width: 200px;
      height: 200px;
      border: 1px solid black;
    }

    .inner {
      width: 200px;
      height: 200px;
      background-color: aqua;
      /* 2d变换的原点 */
      transform-origin: 0px 0px;
      transform: rotate(45deg);
    }
  </style>

<body>
  <div class="outer">
    <div class="inner"></div>
  </div>
</body>

</html>